<?php
/**
 * Created by PhpStorm.
 * User: stupboy
 * Date: 2018/1/26
 * Time: 17:18
 */

namespace app\api\validate;

use think\Validate;

class RefuelRecord extends Validate
{
    // 验证规则
    protected $rule = [
        'car_id|车辆信息'   => 'require|number',
        'driver_id|司机信息'=> 'require|number',
        'label|油标'        => 'require|number|in:89,92,95,98',
        'km|里程'           => 'require|number|min:1',
        'km_add|增加里程'   => 'require|min:0',
        'litre|加油量'      => 'require|float|between:0.1,500',
        'price|加油金额'    => 'require|min:1',
        'start_date'        => 'require|date',
        'refuel_add|加油地点'        => 'require',
        'gas_station|加油站'       => 'require|chs',
        'fuel_man'          => 'require',
        'phone'             => 'require',
        'img'               => 'require',
        'km_img'            => 'require',
    ];
}